<?php
$defautl_env = "staging";

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

    // Define path to framework directory
    defined('FRAMEWORK_PATH')
    || define('FRAMEWORK_PATH', (getenv('FRAMEWORK_PATH') ? getenv('FRAMEWORK_PATH') : dirname(APPLICATION_PATH)));    

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $defautl_env));

    
set_include_path(implode(PATH_SEPARATOR, array(
  realpath(APPLICATION_PATH . '/../library'),
)));

require_once 'Jnd/App.php';

Jnd_App::run(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');